package kp.rpc.provider;

import com.kp.rpc.common.service.UserService;
import kp.rpc.bootstrap.ProviderBootStrap;
import kp.rpc.model.ServiceRegisterInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * 简易服务提供者示例
 */
public class EasyProviderExample {
    public static void main(String[] args) {
        List<ServiceRegisterInfo<?>> list = new ArrayList<>();
        ServiceRegisterInfo<UserService> objectServiceRegisterInfo = new ServiceRegisterInfo<>();
        objectServiceRegisterInfo.setServiceName(UserService.class.getName());
        objectServiceRegisterInfo.setImplClass(UserServiceImpl.class);
        list.add(objectServiceRegisterInfo);
        ProviderBootStrap.init(list, true);
    }
}
